package day2;
import java.util.ArrayList;

// 实体类
// 继承是一种严格的父子关系，你继承什么你就是什么
public class Student extends Person {
	// 属性私有
	private int id;
	private String name;
	public int age;
	private String gender;
	
	// 如果没有写任何一个构造方法，java默认提供一个无参的构造方法，只是我们看不到
	// 如果你写了任何一个构造方法，java就不会提供这个无参的构造方法
	public Student() {
		super();
	}

	public Student(int id, String name, int age, String gender) {
		super();
		this.id = id;
		this.name = name;
		this.age = age;
		this.gender = gender;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", age=" + age + ", gender=" + gender + "]";
	}

}
